package com.dis.api.client;

import com.dis.pojo.entity.Permission;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "user-service")
public interface PermissionClient {

    @GetMapping("/admin/permission/user/api/{userId}")
    List<Permission> getUserApi(@PathVariable Long userId);

    @GetMapping("/admin/permission/isAdmin/api/{userId}")
     boolean isUserAdmin(@PathVariable Long userId);
}
